package string;

public class StatrswithDemo {
    public static void main(String[] args) {
        String str="thinking in java"; //java编程思想(java经典书---工具书)
        boolean starts=str.startsWith("think"); //判断str是否是以think开头的
        System.out.println(starts);
        boolean ends=str.endsWith(".png"); //判断str是否以.png结尾
        System.out.println(ends);
    }
}
